<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="../css/admin.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	.longtxt{width:300px;}
</style>
</head>
<body>
<form name="form1" action="add_site.php" method="post" onSubmit="return VerifyPage();">
<input type="hidden" name="sid" value="<?php echo $sid; ?>" />
<input type="hidden" name="dopost" value="save" />
<div class="listTitle">编辑网站</div>
<div>
<?php
$descr='';
$sname='';
$surl = '';
$sitestatus = 0;
if(!empty($sid))
{	
	$row = $dsql->GetOne("Select * From qf_site where sid='$sid'");

    if(is_array($row))
    {
        $descr = $row['description'];
		$sname = $row['sname'];
		$surl = $row['surl'];
		$sitestatus = $row['sitestatus'];
		$sitestatus = $row['sitestatus'];
    }
}
?>
<table cellpadding="5">
<tr><td>网站名称</td><td><input type="text" class="longtxt" id="sitename" name="sitename" value="<?=$sname?>" /></td></tr>
<tr><td>描述</td><td><input type="text" class="longtxt" id="descr" name="descr" value="<?=$descr?>" /></td></tr>
<tr><td>网址</td><td><input type="text" class="longtxt" id="surl" name="surl" value="<?=$surl?>" /></td></tr>
<tr><td>状态</td><td><input type="radio" id="sitestatus0" name="sitestatus" value="0" <?php if($sitestatus==0)echo('checked');?>  />启用&nbsp;&nbsp;<input type="radio" id="sitestatus1" name="sitestatus" value="1" <?php if($sitestatus==1)echo('checked');?> />禁用</td></tr>
<tr><td></td><td><input type="submit" value=" 保存 " />&nbsp;&nbsp;<input type="button" value="返回" onclick="window.location='sites.php'"/></td></tr>
</table>
</div>
</form>
</body>
</html>